<template>
	<gui-page :customHeader="true" :headerClass="['gui-bg-main']">
		<template v-slot:gHeader>
			<view style="height:44px;background-color: #2862bf;"
				class="gui-flex gui-nowrap gui-rows gui-align-items-center">
				<!-- 使用组件实现返回按钮及返回首页按钮 -->
				<gui-header-leading style="font-family: 'PingFang';" :backButtonClass="['gui-color-white']" :home="false"></gui-header-leading>
				<!-- 此处加一个右侧展位元素与左侧同宽，实现标题居中 -->
				<text style="font-family: 'PingFang';" class="gui-h5 gui-blod gui-flex1 gui-text-center gui-ellipsis gui-primary-text">XXX医院</text>
				<!-- 实际宽度请根据自己情况设置 -->
				<view style="width:120rpx;"></view>
				<!-- 如果右侧有其他内容可以利用条件编译和定位来实现-->
			</view>
		</template>
		<template v-slot:gBody :customHeader="true">
			<view class="gui-padding">
				<view class="gui-h5 gui-text-center">
					{{notice.title}}
				</view>
				<view class="gui-text gui-bg-white">
					<rich-text :nodes="notice.content" style="width:690rpx;"></rich-text>
				</view>
				<view class="">
					<view class="gui-text-small" style="float: right;">
						时间：{{notice.CreatedAt}}
					</view>
				</view>
			</view>
		</template>
	</gui-page>
</template>

<script>
	import useNotice from "@/api/notice"
	const {
		notice,
		showNotice
	} = useNotice()
	export default {
		data() {
			return {
				notice: notice
			}
		},
		async onLoad(options) {
			console.log(options.id)
			await showNotice(options.id)
			this.notice = notice
		},
		methods: {
			
		}
	}
</script>

<style>
</style>